package org.example.boot.ioc;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.example.boot.ioc.demo.ClassRoom;
import org.example.boot.ioc.demo.Student;
import org.example.boot.ioc.demo.Teacher;
import org.example.boot.ioc.pack.DemoA;
import org.example.boot.ioc.pack.DemoB;
import org.example.boot.ioc.pack.DemoD;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;

@Slf4j
@SpringBootApplication

public class BootIocCApplication {
    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(BootIocCApplication.class, args);
//        DemoD a = context.getBean(DemoD.class);
//        System.out.println(a);
//        log.info("DemoD: {}", a);

//        Student a = context.getBean(Student.class);
//        log.info("Studnt: {}", a);

//        ClassRoom a = context.getBean(ClassRoom.class);
//        log.info("Studnt: {}", a);

        Teacher a = context.getBean(Teacher.class);
        log.info("Teacher: {}", a);



    }
}